package com.googlecode.mvcguice.action;

import com.googlecode.mvcguice.Model;

public class Actions {
	private Actions() {
	}

	public static Action render() {
		return new NoAttrViewRenderAction();
	}

	public static Action render(Object instance) {
		return new SingleAttrViewRenderAction(instance);
	}

	public static Action render(Iterable<?> instances) {
		return new SingleAttrViewRenderAction(instances);
	}

	public static Action render(String name, Object value) {
		return new SingleAttrViewRenderAction(name, value);
	}

	public static Action render(Model model) {
		return new MultiAttrViewRenderAction(model);
	}

	public static Action redirect(String location) {
		return new RedirectAction(location);
	}

	public static Action send(String content) {
		return new StringContentAction(content);
	}
}
